use core::fmt;

pub struct Student {
	pub name: String,
	pub id: u32
}

impl fmt::Display for Student {
	fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
		write!(f, "{}, {}", &self.name, &self.id)
	}
}

impl Student {
	pub fn from(name: String, id: u32) -> Student {
		Student {
			name,
			id
		}
	}

	pub fn show(&self) -> (&String, &u32) {
		(&self.name, &self.id)
	}
}